package main

import (
	"fmt"
	"reflect"
)

// 结构体定义
type person struct {
	name string
	age  int8
	city string
}

func main() {
	var people person
	people.name = "深圳彭于晏"
	people.age = 27
	people.city = "深圳"
	fmt.Printf("people=%v\n", people)  // people={深圳彭于晏 27 深圳}
	fmt.Printf("people=%#v\n", people) // people=main.person{name:"深圳彭于晏", age:27, city:"深圳"}

	var p2 = new(person)
	fmt.Println(reflect.TypeOf(p2)) // *main.person
	fmt.Printf("%#v\n", p2)         // &main.person{name:"", age:0, city:""}
}
